<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>比较最大值</title>
	</head>
	<body>
	</body>
	<script>
		function getMax(a,b){
			// 过滤掉undefined  null NaN  ""  0
			a = a ||0;
			b = b || 0;
			return a>=b ? a : b;
		}
		console.log(getMax(6.98,6.99));
	</script>
</html>
